package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * SecurityQuestion entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_SECURITY_QUESTION", schema = "HCD_DEV")
public class SecurityQuestion extends Entity implements java.io.Serializable {

	// Fields

	private Long questionId;
	private Member member;
	private String question;
	private String answer;

	// Constructors

	/** default constructor */
	public SecurityQuestion() {
	}

	/** full constructor */
	public SecurityQuestion(Member member, String question, String answer) {
		this.member = member;
		this.question = question;
		this.answer = answer;
	}

	// Property accessors
	@SequenceGenerator(name = "generator", sequenceName = "SEQ_SECURITY_QUESTION")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "QUESTION_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getQuestionId() {
		return this.questionId;
	}

	public void setQuestionId(Long questionId) {
		this.questionId = questionId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MEMBER_ID", nullable = false)
	public Member getMember() {
		return this.member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	@Column(name = "QUESTION", nullable = false, length = 100)
	public String getQuestion() {
		return this.question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	@Column(name = "ANSWER", nullable = false, length = 250)
	public String getAnswer() {
		return this.answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

}